#pragma once

#include <cerrno>
#include <cstring>
#include <fcntl.h>
#include <iostream>
#include <unistd.h>

void setNonBlock(int fd) {
  int fl = fcntl(fd, F_GETFL);
  if (fl < 0) {
    std::cerr << "fcntl : " << strerror(errno) << std::endl;
    return;
  }
  fcntl(fd, F_SETFL, fl | O_NONBLOCK);
}

void printLog() { std::cout << "this is a log" << std::endl; }

void download() { std::cout << "this is a download" << std::endl; }

void executeSql() { std::cout << "this is a executeSql" << std::endl; }
